<template>
  <div class="error-box ">
    <div class="main">
      <div class="img">
        404
      </div>
      <div class="txt-box">
        <p class="title">
          抱歉找不到这个页面…
        </p>
        <p class="txt">
          请确认输入的网址是否正确，或者
          <router-link class="a" to="/">
            去首页看看
          </router-link>
        </p>
      </div>
    </div>
  </div>
</template>

<script>
import { mapMutations } from 'vuex'
export default {
  head () {
    return {
      title: '404错误，当前页面未找到或地址不正确',
      meta: [
        { hid: 'description', name: 'description', content: '404错误，抱歉，当前页面未找到或您输入的地址不正确，您可以xxx首页或其它页面。' }
      ]
    }
  },
  mounted () {
    this.setIsError(true)
    this.setIsScroll(false)
  },
  destroyed () {
    this.setIsError(false)
    this.setIsScroll(true)
  },
  methods: {
    ...mapMutations('header', ['setIsScroll', 'setIsError'])
  }
}
</script>

<style lang="scss">
.error-box{
  box-sizing: border-box;
  width: 100vw;
  height: calc(100vh - 46px);
  padding-top: 90px;
  box-sizing: border-box;
  .main{
    height: 100%;
    min-width: 1200px;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    position: relative;
    background-color: #fff;
  }
  .img{
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    z-index: 1;
    font-size: 260px;
    left: 50%;
    transform: translate(-50%);
  }
  .txt-box{
    padding-right: calc((100% - 1264px) / 2 + 60px);;
    padding-bottom: 47px;
    line-height: 35px;
    position: relative;
    z-index: 2;
    .txt{
      color: #999;
    }
    .a{
      color: #469AFF;
    }
  }
}
</style>
